/**
 * <copyright>
 * </copyright>
 *

 */
package org.xtext.example.cr.cR.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import org.xtext.example.cr.cR.Add;
import org.xtext.example.cr.cR.Archive;
import org.xtext.example.cr.cR.Array;
import org.xtext.example.cr.cR.ArrayDec;
import org.xtext.example.cr.cR.ArrayElement;
import org.xtext.example.cr.cR.ArrayMethod;
import org.xtext.example.cr.cR.Assignment;
import org.xtext.example.cr.cR.CRFactory;
import org.xtext.example.cr.cR.CRFunction;
import org.xtext.example.cr.cR.CRLanguage;
import org.xtext.example.cr.cR.CRPackage;
import org.xtext.example.cr.cR.CalcCR;
import org.xtext.example.cr.cR.CalcMean;
import org.xtext.example.cr.cR.Delete;
import org.xtext.example.cr.cR.Element;
import org.xtext.example.cr.cR.FindSimilar;
import org.xtext.example.cr.cR.Folder;
import org.xtext.example.cr.cR.For;
import org.xtext.example.cr.cR.Forall;
import org.xtext.example.cr.cR.Function;
import org.xtext.example.cr.cR.HighestCR;
import org.xtext.example.cr.cR.Index;
import org.xtext.example.cr.cR.IntDec;
import org.xtext.example.cr.cR.LinuxFolder;
import org.xtext.example.cr.cR.PartitionDec;
import org.xtext.example.cr.cR.PrimitiveDec;
import org.xtext.example.cr.cR.Print;
import org.xtext.example.cr.cR.RealDec;
import org.xtext.example.cr.cR.SimpleVariable;
import org.xtext.example.cr.cR.Size;
import org.xtext.example.cr.cR.StandardFunction;
import org.xtext.example.cr.cR.VarDec;
import org.xtext.example.cr.cR.Variable;
import org.xtext.example.cr.cR.WindowsFolder;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class CRFactoryImpl extends EFactoryImpl implements CRFactory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static CRFactory init()
  {
    try
    {
      CRFactory theCRFactory = (CRFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.xtext.org/example/cr/CR"); 
      if (theCRFactory != null)
      {
        return theCRFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new CRFactoryImpl();
  }

  /**
   * Creates an instance of the factory.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CRFactoryImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case CRPackage.CR_LANGUAGE: return createCRLanguage();
      case CRPackage.ELEMENT: return createElement();
      case CRPackage.VAR_DEC: return createVarDec();
      case CRPackage.PRIMITIVE_DEC: return createPrimitiveDec();
      case CRPackage.INT_DEC: return createIntDec();
      case CRPackage.REAL_DEC: return createRealDec();
      case CRPackage.PARTITION_DEC: return createPartitionDec();
      case CRPackage.ARRAY_DEC: return createArrayDec();
      case CRPackage.ASSIGNMENT: return createAssignment();
      case CRPackage.ARRAY_METHOD: return createArrayMethod();
      case CRPackage.SIZE: return createSize();
      case CRPackage.ADD: return createAdd();
      case CRPackage.DELETE: return createDelete();
      case CRPackage.FUNCTION: return createFunction();
      case CRPackage.STANDARD_FUNCTION: return createStandardFunction();
      case CRPackage.PRINT: return createPrint();
      case CRPackage.FOR: return createFor();
      case CRPackage.FORALL: return createForall();
      case CRPackage.CR_FUNCTION: return createCRFunction();
      case CRPackage.CALC_CR: return createCalcCR();
      case CRPackage.CALC_MEAN: return createCalcMean();
      case CRPackage.HIGHEST_CR: return createHighestCR();
      case CRPackage.FIND_SIMILAR: return createFindSimilar();
      case CRPackage.VARIABLE: return createVariable();
      case CRPackage.SIMPLE_VARIABLE: return createSimpleVariable();
      case CRPackage.ARRAY: return createArray();
      case CRPackage.NUMBER: return createNumber();
      case CRPackage.FOLDER: return createFolder();
      case CRPackage.ARCHIVE: return createArchive();
      case CRPackage.LINUX_FOLDER: return createLinuxFolder();
      case CRPackage.WINDOWS_FOLDER: return createWindowsFolder();
      case CRPackage.ARRAY_ELEMENT: return createArrayElement();
      case CRPackage.INDEX: return createIndex();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CRLanguage createCRLanguage()
  {
    CRLanguageImpl crLanguage = new CRLanguageImpl();
    return crLanguage;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Element createElement()
  {
    ElementImpl element = new ElementImpl();
    return element;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public VarDec createVarDec()
  {
    VarDecImpl varDec = new VarDecImpl();
    return varDec;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PrimitiveDec createPrimitiveDec()
  {
    PrimitiveDecImpl primitiveDec = new PrimitiveDecImpl();
    return primitiveDec;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public IntDec createIntDec()
  {
    IntDecImpl intDec = new IntDecImpl();
    return intDec;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RealDec createRealDec()
  {
    RealDecImpl realDec = new RealDecImpl();
    return realDec;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PartitionDec createPartitionDec()
  {
    PartitionDecImpl partitionDec = new PartitionDecImpl();
    return partitionDec;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ArrayDec createArrayDec()
  {
    ArrayDecImpl arrayDec = new ArrayDecImpl();
    return arrayDec;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Assignment createAssignment()
  {
    AssignmentImpl assignment = new AssignmentImpl();
    return assignment;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ArrayMethod createArrayMethod()
  {
    ArrayMethodImpl arrayMethod = new ArrayMethodImpl();
    return arrayMethod;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Size createSize()
  {
    SizeImpl size = new SizeImpl();
    return size;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Add createAdd()
  {
    AddImpl add = new AddImpl();
    return add;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Delete createDelete()
  {
    DeleteImpl delete = new DeleteImpl();
    return delete;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Function createFunction()
  {
    FunctionImpl function = new FunctionImpl();
    return function;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public StandardFunction createStandardFunction()
  {
    StandardFunctionImpl standardFunction = new StandardFunctionImpl();
    return standardFunction;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Print createPrint()
  {
    PrintImpl print = new PrintImpl();
    return print;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public For createFor()
  {
    ForImpl for_ = new ForImpl();
    return for_;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Forall createForall()
  {
    ForallImpl forall = new ForallImpl();
    return forall;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CRFunction createCRFunction()
  {
    CRFunctionImpl crFunction = new CRFunctionImpl();
    return crFunction;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CalcCR createCalcCR()
  {
    CalcCRImpl calcCR = new CalcCRImpl();
    return calcCR;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CalcMean createCalcMean()
  {
    CalcMeanImpl calcMean = new CalcMeanImpl();
    return calcMean;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public HighestCR createHighestCR()
  {
    HighestCRImpl highestCR = new HighestCRImpl();
    return highestCR;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public FindSimilar createFindSimilar()
  {
    FindSimilarImpl findSimilar = new FindSimilarImpl();
    return findSimilar;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Variable createVariable()
  {
    VariableImpl variable = new VariableImpl();
    return variable;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SimpleVariable createSimpleVariable()
  {
    SimpleVariableImpl simpleVariable = new SimpleVariableImpl();
    return simpleVariable;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Array createArray()
  {
    ArrayImpl array = new ArrayImpl();
    return array;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public org.xtext.example.cr.cR.Number createNumber()
  {
    NumberImpl number = new NumberImpl();
    return number;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Folder createFolder()
  {
    FolderImpl folder = new FolderImpl();
    return folder;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Archive createArchive()
  {
    ArchiveImpl archive = new ArchiveImpl();
    return archive;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LinuxFolder createLinuxFolder()
  {
    LinuxFolderImpl linuxFolder = new LinuxFolderImpl();
    return linuxFolder;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public WindowsFolder createWindowsFolder()
  {
    WindowsFolderImpl windowsFolder = new WindowsFolderImpl();
    return windowsFolder;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ArrayElement createArrayElement()
  {
    ArrayElementImpl arrayElement = new ArrayElementImpl();
    return arrayElement;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Index createIndex()
  {
    IndexImpl index = new IndexImpl();
    return index;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public CRPackage getCRPackage()
  {
    return (CRPackage)getEPackage();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @deprecated
   * @generated
   */
  @Deprecated
  public static CRPackage getPackage()
  {
    return CRPackage.eINSTANCE;
  }

} //CRFactoryImpl
